//
//package com.rt.schedulebase.service.impl;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//import com.rt.schedulebase.dto.ExamScheduleApmDto;
//import com.rt.schedulebase.entity.ExamScheduleApm;
//import com.rt.schedulebase.mapper.ExamScheduleApmMapper;
//import com.rt.schedulebase.service.IExamScheduleApmService;
//import org.springframework.stereotype.Service;
//import org.springframework.transaction.annotation.Propagation;
//import org.springframework.transaction.annotation.Transactional;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
//@Service("ExamScheduleApmServiceImpl_v2")
//public class ExamScheduleApmServiceImpl extends ServiceImpl<ExamScheduleApmMapper, ExamScheduleApm> implements IExamScheduleApmService {
//    @Override
//    public boolean insertSelective(ExamScheduleApm examScheduleApm) {
//        return retBool(baseMapper.insert(examScheduleApm));
//    }
//
//    @Override
//    public boolean deleteByPrimaryKey(String key) {
//        return retBool(baseMapper.deleteById(key));
//    }
//
//    @Override
//    public boolean updateByPrimaryKeySelective(ExamScheduleApm examScheduleApm) {
//        return retBool(baseMapper.updateById(examScheduleApm));
//    }
//
//    @Override
//    public ExamScheduleApm selectByPrimaryKey(String key) {
//        return baseMapper.selectById(key);
//    }
//
//    @Override
//    public List<ExamScheduleApm> getList(ExamScheduleApmDto dto) {
//        QueryWrapper<ExamScheduleApm> qw = new QueryWrapper<>();
//        Map<String, Object> map = new HashMap<>();
//        map.put("APM_CODE", dto.getApmCode());
//        map.put("SCHEDULE_DATE", dto.getScheduleDate());
//        qw.allEq(map, false);
//        List<ExamScheduleApm> list = baseMapper.selectList(qw);
//        return list;
//    }
//
//    @Override
//    public List<ExamScheduleApm> getListAll() {
//        return baseMapper.selectList(null);
//    }
//
//    @Override
//    public boolean delete(ExamScheduleApm examScheduleApm) {
//        UpdateWrapper<ExamScheduleApm> uw = new UpdateWrapper<>();
//        Map<String, Object> map = new HashMap<>();
//        map.put("SCHEDULE_DATE", examScheduleApm.getScheduleDate());
//        map.put("APM_CODE", examScheduleApm.getApmCode());
//        uw.allEq(map, false);
//        return retBool(baseMapper.delete(uw));
//    }
//
//    @Transactional(propagation = Propagation.REQUIRES_NEW)
//    @Override
//    public boolean update(ExamScheduleApm examScheduleApm) {
//        UpdateWrapper<ExamScheduleApm> uw = new UpdateWrapper<>();
//        Map<String, Object> map = new HashMap<>();
//        map.put("SCHEDULE_DATE", examScheduleApm.getScheduleDate());
//        map.put("APM_CODE", examScheduleApm.getApmCode());
//        uw.allEq(map, false);
//        return retBool(baseMapper.update(examScheduleApm, uw));
//    }
//
//    @Override
//    public ExamScheduleApm getInfo(ExamScheduleApmDto dto) {
//        QueryWrapper<ExamScheduleApm> qw = new QueryWrapper<>();
//        Map<String, Object> map = new HashMap<>();
//        map.put("SCHEDULE_DATE", dto.getScheduleDate());
//        map.put("APM_CODE", dto.getApmCode());
//        qw.allEq(map, false);
//        return baseMapper.selectOne(qw);
//    }
//
//    @Override
//    public int getCount(ExamScheduleApmDto dto) {
//        QueryWrapper<ExamScheduleApm> qw = new QueryWrapper<>();
//        Map<String, Object> map = new HashMap<>();
//        map.put("SCHEDULE_DATE", dto.getScheduleDate());
//        map.put("APM_CODE", dto.getApmCode());
//        qw.allEq(map, false);
//        return baseMapper.selectCount(qw);
//    }
//}
